import { Message } from 'element-ui';

export function message(message, type = 'success') {
    let data
    switch (type) {
        case "success":
            data = Message.success({
                message: message,
                center: true,
                offset: 100
            })
            break;
        case "error":
            data = Message.error({
                message: message,
                center: true,
                offset: 100
            })
            break;
        case "warning":
            data = Message.warning({
                message: message,
                center: true,
                offset: 100
            })
            break;
    }

    return data;
}